package com.xiaoq.order.entity;

import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.Map;

/**
 * @author qudongxin520 created on 2016/9/8.
 */
public class PayParam {
    /**
     * order_no  订单号  必填
     * app[id]           必填
     * channel  支付渠道  alipay  ｛alipay：支付宝，wx：微信，cnp_u:应用内快捷支付（银联）｝  必填
     * amount  支付总结额 必须大于0  单位为对应币种的最小货币单位，RMB 为分。例如订单总金额1元  amount为100  必填
     * client_ip  发起支付的客户端ipv4    ClientIpHandler有提供方法获取request对象 ip 必填
     * currency  三位ISO货币代码 目前只支持人民币  cny     必填
     * subject 商品标题  32个Unicode字符   必填
     * body 商品描述信息  最长128个Unicode字符 必填
     *
     * extra  特定渠道发起交易时需要的额外参数，以及部分渠道支付成功返回的额外参数；有时候需要调用第三方平台的某些服务，第三方平台就需要token，而这个参数就是第三方的授权token  可选
     * time_expire  订单失效时间   可选
     * metadata  附带一些信息 如：颜色 ，型号  可选
     * description  订单描述  可选
     * */
    @NotEmpty
    @ApiModelProperty(value = "订单id",required = true)
    private String order_no;
    @ApiModelProperty(hidden = true)
    private Map<String ,String> app;
    @NotEmpty
    @ApiModelProperty(value = "支付方式",allowableValues = "alipay,wx,cnp_u",required = true)
    private String channel;
    @ApiModelProperty(hidden = true)
    private Long amount;
    @ApiModelProperty(hidden = true)
    private String client_ip;
    @ApiModelProperty(hidden = true)
    private String currency = "cny";
    @ApiModelProperty(hidden = true)
    private String subject;
    @ApiModelProperty(hidden = true)
    private String body;
    private String description;
	public String getOrder_no() {
		return order_no;
	}
	public void setOrder_no(String order_no) {
		this.order_no = order_no;
	}
	public Map<String, String> getApp() {
		return app;
	}
	public void setApp(Map<String, String> app) {
		this.app = app;
	}
	public String getChannel() {
		return channel;
	}
	public void setChannel(String channel) {
		this.channel = channel;
	}
	public Long getAmount() {
		return amount;
	}
	public void setAmount(Long amount) {
		this.amount = amount;
	}
	public String getClient_ip() {
		return client_ip;
	}
	public void setClient_ip(String client_ip) {
		this.client_ip = client_ip;
	}
	public String getCurrency() {
		return currency;
	}
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	public String getSubject() {
		return subject;
	}
	public void setSubject(String subject) {
		this.subject = subject;
	}
	public String getBody() {
		return body;
	}
	public void setBody(String body) {
		this.body = body;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}



}
